﻿using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace Project06
{
    class Object
    {
        GraphicsDevice graphicDevice;

        private Texture2D texture;
        public Texture2D Texture
        {
            get { return texture; }
            set { texture = value; }
        }

        private Vector2 position;
        public Vector2 Position
        {
            get { return position; }
            set { position = value; }
        }

        private int mass;
        public int Mass
        {
            get { return mass; }
            set { mass = value; }
        }

        private Vector2 origin;
        public Vector2 Origin
        {
            get { return origin; }
            set { origin = value; }
        }        
     
        private double momentOfInertiaCenter;
        public double MomentOfInertiaCenter
        { 
            get { return momentOfInertiaCenter; }
            set { momentOfInertiaCenter = value; }
        }

        private float distance;
        public float Distance
        {
            get { return distance; }
            set { distance = value; }
        }
     
        private double momentOfInertiaCOM;
        public double MomentOfInertiaCOM
        {
            get { return momentOfInertiaCOM; }
            set { momentOfInertiaCOM = value; }
        }

        private Vector2 offset;

        public Object(Texture2D texture, Vector2 position, int mass)
        {
            this.texture = texture;
            this.position = position;
            this.mass = mass;

            origin = new Vector2(texture.Width / 2, texture.Height / 2);
            offset = new Vector2(450, 450);
        }

        public void Draw(SpriteBatch spriteBatch, float rotation)
        {
            spriteBatch.Draw(Texture, Position + offset, null, Color.White, rotation, Origin, 1f, SpriteEffects.None, 1f);
        }
    }
}
